﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace MyVideoPlayer.Converters
{
    public class BoolToVisibility2Converter : ValueConverterBase
    {
        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            //if (value is bool b)
            //    return b ? Visibility.Collapsed : Visibility.Visible;
            //return Visibility.Visible;
            if (value is bool b)
                return b ? false : true;
            return true;
        }

        public override object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            //if (value is Visibility v)
            //    return v != Visibility.Visible;
            //return false;
            throw new NotImplementedException("ConvertBack method is not implemented for BoolToVisibility2Converter.");
        }
    }
}
